<!-- 统计仪表板 -->
<div class="row">
  <div class="col-lg-12">
    <h1 class="page-header">
      <i class="fa fa-dashboard"></i> 数据统计概览
      <small>系统运营数据一览</small>
    </h1>
  </div>
</div>

<!-- 用户统计 -->
<div class="row">
  <div class="col-lg-3 col-md-6">
    <div class="info-box">
      <span class="info-box-icon bg-aqua"><i class="fa fa-users"></i></span>
      <div class="info-box-content">
        <span class="info-box-text">总用户数</span>
        <span class="info-box-number">{$stats.user.total_users|default=0}</span>
        <div class="progress">
          <div class="progress-bar" style="width: 100%"></div>
        </div>
        <span class="progress-description">
          <a href="{:url('User/userList')}" class="small-box-footer">
            查看详情 <i class="fa fa-arrow-circle-right"></i>
          </a>
        </span>
      </div>
    </div>
  </div>

  <div class="col-lg-3 col-md-6">
    <div class="info-box">
      <span class="info-box-icon bg-green"><i class="fa fa-user-plus"></i></span>
      <div class="info-box-content">
        <span class="info-box-text">今日新增用户</span>
        <span class="info-box-number">{$stats.user.today_new_users|default=0}</span>
        <div class="progress">
          <div class="progress-bar" style="width: 70%"></div>
        </div>
        <span class="progress-description">
          <a href="{:url('User/userList', ['create_time' => date('Y-m-d')])}" class="small-box-footer">
            查看详情 <i class="fa fa-arrow-circle-right"></i>
          </a>
        </span>
      </div>
    </div>
  </div>

  <div class="col-lg-3 col-md-6">
    <div class="info-box">
      <span class="info-box-icon bg-yellow"><i class="fa fa-diamond"></i></span>
      <div class="info-box-content">
        <span class="info-box-text">VIP用户数</span>
        <span class="info-box-number">{$stats.user.vip_users|default=0}</span>
        <div class="progress">
          <div class="progress-bar" style="width: 60%"></div>
        </div>
        <span class="progress-description">
          <a href="{:url('User/userList', ['is_vip' => 1])}" class="small-box-footer">
            查看详情 <i class="fa fa-arrow-circle-right"></i>
          </a>
        </span>
      </div>
    </div>
  </div>

  <div class="col-lg-3 col-md-6">
    <div class="info-box">
      <span class="info-box-icon bg-red"><i class="fa fa-heart"></i></span>
      <div class="info-box-content">
        <span class="info-box-text">活跃用户数</span>
        <span class="info-box-number">{$stats.user.active_users|default=0}</span>
        <div class="progress">
          <div class="progress-bar" style="width: 80%"></div>
        </div>
        <span class="progress-description">
          <a href="{:url('User/userList', ['is_active' => 1])}" class="small-box-footer">
            查看详情 <i class="fa fa-arrow-circle-right"></i>
          </a>
        </span>
      </div>
    </div>
  </div>
</div>

<!-- VIP订单统计 -->
<div class="row">
  <div class="col-lg-3 col-md-6">
    <div class="info-box">
      <span class="info-box-icon bg-purple"><i class="fa fa-shopping-cart"></i></span>
      <div class="info-box-content">
        <span class="info-box-text">总订单数</span>
        <span class="info-box-number">{$stats.vip_order.total_orders|default=0}</span>
        <div class="progress">
          <div class="progress-bar" style="width: 100%"></div>
        </div>
        <span class="progress-description">
          <a href="{:url('Vip/orderList')}" class="small-box-footer">
            查看详情 <i class="fa fa-arrow-circle-right"></i>
          </a>
        </span>
      </div>
    </div>
  </div>

  <div class="col-lg-3 col-md-6">
    <div class="info-box">
      <span class="info-box-icon bg-green"><i class="fa fa-calendar"></i></span>
      <div class="info-box-content">
        <span class="info-box-text">今日订单</span>
        <span class="info-box-number">{$stats.vip_order.today_orders|default=0}</span>
        <div class="progress">
          <div class="progress-bar" style="width: 70%"></div>
        </div>
        <span class="progress-description">
          <a href="{:url('Vip/orderList')}" class="small-box-footer">
            查看详情 <i class="fa fa-arrow-circle-right"></i>
          </a>
        </span>
      </div>
    </div>
  </div>

  <div class="col-lg-3 col-md-6">
    <div class="info-box">
      <span class="info-box-icon bg-yellow"><i class="fa fa-money"></i></span>
      <div class="info-box-content">
        <span class="info-box-text">订单收入</span>
        <span class="info-box-number">¥{$stats.vip_order.total_income|default=0}</span>
        <div class="progress">
          <div class="progress-bar" style="width: 90%"></div>
        </div>
        <span class="progress-description">
          <a href="{:url('Vip/orderList')}" class="small-box-footer">
            查看详情 <i class="fa fa-arrow-circle-right"></i>
          </a>
        </span>
      </div>
    </div>
  </div>

  <div class="col-lg-3 col-md-6">
    <div class="info-box">
      <span class="info-box-icon bg-red"><i class="fa fa-clock-o"></i></span>
      <div class="info-box-content">
        <span class="info-box-text">待支付订单</span>
        <span class="info-box-number">{$stats.vip_order.pending_orders|default=0}</span>
        <div class="progress">
          <div class="progress-bar" style="width: 50%"></div>
        </div>
        <span class="progress-description">
          <a href="{:url('Vip/orderList')}" class="small-box-footer">
            查看详情 <i class="fa fa-arrow-circle-right"></i>
          </a>
        </span>
      </div>
    </div>
  </div>
</div>

<!-- 提现统计 -->
<div class="row">
  <div class="col-lg-4 col-md-6">
    <div class="info-box">
      <span class="info-box-icon bg-blue"><i class="fa fa-credit-card"></i></span>
      <div class="info-box-content">
        <span class="info-box-text">提现申请数</span>
        <span class="info-box-number">{$stats.withdraw.total_applications|default=0}</span>
        <div class="progress">
          <div class="progress-bar" style="width: 100%"></div>
        </div>
        <span class="progress-description">
          <a href="{:url('Withdraw/withdrawList', ['status' => 0])}" class="small-box-footer">
            查看详情 <i class="fa fa-arrow-circle-right"></i>
          </a>
        </span>
      </div>
    </div>
  </div>

  <div class="col-lg-4 col-md-6">
    <div class="info-box">
      <span class="info-box-icon bg-orange"><i class="fa fa-hourglass-half"></i></span>
      <div class="info-box-content">
        <span class="info-box-text">待处理提现</span>
        <span class="info-box-number">{$stats.withdraw.pending_applications|default=0}</span>
        <div class="progress">
          <div class="progress-bar" style="width: 60%"></div>
        </div>
        <span class="progress-description">
          <a href="{:url('Withdraw/withdrawList')}" class="small-box-footer">
            查看详情 <i class="fa fa-arrow-circle-right"></i>
          </a>
        </span>
      </div>
    </div>
  </div>

  <div class="col-lg-4 col-md-6">
    <div class="info-box">
      <span class="info-box-icon bg-green"><i class="fa fa-check-circle"></i></span>
      <div class="info-box-content">
        <span class="info-box-text">提现总额</span>
        <span class="info-box-number">¥{$stats.withdraw.total_amount|default=0}</span>
        <div class="progress">
          <div class="progress-bar" style="width: 80%"></div>
        </div>
        <span class="progress-description">
          <a href="{:url('Withdraw/withdrawList')}" class="small-box-footer">
            查看详情 <i class="fa fa-arrow-circle-right"></i>
          </a>
        </span>
      </div>
    </div>
  </div>
</div>

<!-- 产品统计 -->
<div class="row">
  <div class="col-lg-6 col-md-6">
    <div class="info-box">
      <span class="info-box-icon bg-teal"><i class="fa fa-cubes"></i></span>
      <div class="info-box-content">
        <span class="info-box-text">产品总数</span>
        <span class="info-box-number">{$stats.product.total_products|default=0}</span>
        <div class="progress">
          <div class="progress-bar" style="width: 100%"></div>
        </div>
        <span class="progress-description">
          <a href="{:url('Product/productList')}" class="small-box-footer">
            查看详情 <i class="fa fa-arrow-circle-right"></i>
          </a>
        </span>
      </div>
    </div>
  </div>

  <div class="col-lg-6 col-md-6">
    <div class="info-box">
      <span class="info-box-icon bg-navy"><i class="fa fa-plus-circle"></i></span>
      <div class="info-box-content">
        <span class="info-box-text">今日新增产品</span>
        <span class="info-box-number">{$stats.product.today_new_products|default=0}</span>
        <div class="progress">
          <div class="progress-bar" style="width: 70%"></div>
        </div>
        <span class="progress-description">
          <a href="{:url('Product/productList')}" class="small-box-footer">
            查看详情 <i class="fa fa-arrow-circle-right"></i>
          </a>
        </span>
      </div>
    </div>
  </div>
</div>

<!-- 热门产品列表 -->
<div class="row">
  <div class="col-md-6">
    <div class="box box-primary">
      <div class="box-header with-border">
        <h3 class="box-title"><i class="fa fa-fire"></i> 热门产品</h3>
        <div class="box-tools pull-right">
          <button type="button" class="btn btn-box-tool" data-widget="collapse">
            <i class="fa fa-minus"></i>
          </button>
        </div>
      </div>
      <div class="box-body">
        <ul class="products-list product-list-in-box">
          {volist name="stats.product.popular_products" id="product"}
          <li class="item">
            <div class="product-info">
              <a href="{:url('Product/productEdit', ['id' => $product.id])}" class="product-title">
                {$product.name}
                <span class="label label-info pull-right">关注 {$product.follow_count|default=0}</span>
              </a>
              <span class="product-description">
                产品ID: {$product.id}
              </span>
            </div>
          </li>
          {/volist}
          {empty name="stats.product.popular_products"}
          <li class="item">
            <div class="product-info">
              <span class="product-description text-muted">暂无热门产品数据</span>
            </div>
          </li>
          {/empty}
        </ul>
      </div>
      <div class="box-footer text-center">
        <a href="{:url('Product/productList')}" class="uppercase">查看所有产品</a>
      </div>
    </div>
  </div>

  <!-- 系统信息 -->
  <div class="col-md-6">
    <div class="box box-info">
      <div class="box-header with-border">
        <h3 class="box-title"><i class="fa fa-info-circle"></i> 系统信息</h3>
        <div class="box-tools pull-right">
          <button type="button" class="btn btn-box-tool" data-widget="collapse">
            <i class="fa fa-minus"></i>
          </button>
        </div>
      </div>
      <div class="box-body">
        <table class="table table-bordered">
          <tbody>
            <tr>
              <td><strong>操作系统</strong></td>
              <td>{$info.os}</td>
            </tr>
            <tr>
              <td><strong>运行环境</strong></td>
              <td>{$info.software}</td>
            </tr>
            <tr>
              <td><strong>MySQL版本</strong></td>
              <td>{$info.mysql_version}</td>
            </tr>
            <tr>
              <td><strong>PHP版本</strong></td>
              <td>{$info.php_version}</td>
            </tr>
            <tr>
              <td><strong>上传限制</strong></td>
              <td>{$info.upload_max}</td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</div>

